Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: no additional variables during constraint construction #131

Merged

Conversation

RobbinBaauw
Copy link
Contributor

There are three spots in the flatzinc parser & constraint constructors that I believe to contain unnecessary variable creation:

  • create_domains for BooleanLessThanOrEqual and BooleanEqual
  • compile_bool2int

It seems like we can directly used the parsed literals instead of creating a new variable and a linking clause. It only requires access to the underlying integer_variable of the literal, but I don't see that as a problem. Is there any reason for doing it this way, or is it because of the legacy structure?

@ImkoMarijnissen ImkoMarijnissen merged commit e80e73d into ConSol-Lab:develop Jan 22, 2025
4 checks passed
@RobbinBaauw RobbinBaauw deleted the feat/no-additional-variables branch January 27, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants